package com.hbk.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@TableName("news")
@Data
public class News {

    @TableId(value = "news_id", type= IdType.ASSIGN_ID)
    private String id;
    @TableField(value = "news_title")
    private String title;           //标题
    @TableField(value = "news_summary")
    private String summary;         //摘要
    @TableField(value = "news_img_url")
    private String imgUrl;          //图片

    /**
        新闻类型
        1:  高考资讯
        2:  报考资讯
     */
    @TableField(value = "news_type")
    private Integer type;
    @TableField(value = "news_state")
    private Integer state;          //新闻状态(0:未发布, 1:已发布)
    @TableField(value = "news_create_time")
    private Date createTime;        //创建时间
    @TableField(value = "news_publish_time")
    private Date publishTime;       //发布时间
    @TableField(value = "news_update_time")
    private Date updateTime;        //更新时间
    @TableField(value = "news_order_num")
    private Integer orderNum;          //排序（默认为发布时间的时间戳）
}
